/**
 * @Date: 2022-04-10 12:51:54
 * @LastEditors: sailornpg
 * @LastEditTime: 2022-04-13 16:08:16
 * @FilePath: \weibo-api\model\Blog.js
 * @Description: 微博数据模型
 */
const sequelize = require("../db/seq");
const { DataTypes } = require("sequelize");
//创建模型 表名字为'blog'
const Blog = sequelize.define("blog", {
  userId: {
    type: DataTypes.INTEGER,
    allowNull: false,
  },
  content: {
    type: DataTypes.TEXT,
    allowNull: false,
  },
  imageUrl: {
    type: DataTypes.TEXT,
    comment: "图片地址",
  },
});
module.exports = Blog;
